#ifndef __RFIDLIB_H__
#define __RFIDLIB_H__

#pragma pack (push, 8)
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#pragma pack(pop)

/* 错误代码顺序不能随便更改*/

enum{
ERR_OK=0, 							/* 0, No error, everything OK. */
ERR_UNKNOWN	, 						/* 1, Use for unknown */
ERR_IO	, 							/* 2, error from communication layer */			
ERR_ARG , 							/* 3, Illegal argument.        */
ERR_NOSYS	, 						/* 4, the case option is not supported */
ERR_TIMEOUT	, 						/* 5, time out */
ERR_MEM	, 							/* 6, memory is low */
ERR_NOTSUP	, 						/* 7, not setup */
ERR_BUSY, 							/* 8, busy */
ERR_OVERFLOW, 						/* 9, over flow */
ERR_ABORT, 							/* 10, abort */
ERR_SIZE, 							/* 11, length is wrong */
ERR_MSGSIZE	, 						/* 12, Message size */
ERR_CANCEL, 							/* 13,  */
ERR_CLOSED, 							/* 14closed */
ERR_NOTSOCK, 						/* 15 */
ERR_LOWVER, 							/* 16版本太低*/
ERR_DEVICE	, 						/* 17 control operation fail, error code return by device 	 */	
ERR_CHKSUM	, 						/* 18 */
ERR_USED, 							/* 19 the resource is used */
ERR_COLLISION	, 					/* 20 the resource cause Collision */
ERR_STOPTRRIGOCUR, 					/* 21 inventory stop trigger timeout, maybe more tag to read */
ERR_NOCMD, 							/* 22 not supported command */
ERR_NOCFG, 							/* 23 not configuration option is not supported */
ERR_NOEXIST, 						/* 24 not exist */
ERR_SOCKET, 							/* 25 socket error */
ERR_MEMSIZE	, 						/* 26 application memory size is wrong */
ERR_MSGDATA, 						/* 27 message data is wrong */
ERR_EXIST, 							/* 28 the item is exist */

ERR_RESFD, 							/* 29result field is wrong */
ERR_WSAENOTCONN, 					/*30*/
ERR_WSAEWOULDBLOCK, 				/*31*/
ERR_WSAESHUTDOWN, 					/*32*/
ERR_NOCONN, 							/*33*/
ERR_MEMRELEASED	, 					/* 34内存已经被释放*/
ERR_QUICKEXIT, 						/* 35快速退出标识 */
ERR_ANTENNAPARAMETER, 				/*36*/
ERR_CFGBLOCKLOCK,                   /*37*/
ERR_TRANSPORTRECERVE,               /*38*/

ERR_NOTONSHEFT,                     //39 货物未上架
ERR_NODEAL,                         //40 不需要处理的错误
ERR_DEVIE_VERIFY,                   //41 设备验证错误

};

#define ERR_OK  NO_ERR




#ifndef __packed
#define __packed        __attribute__ ((__packed__))
#endif
/********************************************************************************************************/
/*	类型定义区																						    */
/********************************************************************************************************/
#ifndef CONST
#define CONST           const
#endif

#ifndef RFID_API
#define RFID_API       extern
#endif

typedef unsigned char u8_t;
typedef unsigned short u16_t;
typedef unsigned int u32_t;
typedef signed short s16_t;
typedef signed int s32_t;

#ifndef INVALID_SOCKET
#define INVALID_SOCKET  (0)
#endif
#ifndef SOCKET_ERROR
#define SOCKET_ERROR (-1)
#endif

//typedef unsigned long  kernel_ulong_t;

//#ifndef mips64
//typedef unsigned long   __u64;
//typedef unsigned int    __u32;
//typedef unsigned short   __u16;
//typedef unsigned char   __u8;

//typedef signed long    __s64;
//typedef signed int      __s32;
//typedef signed short    __s16;
//typedef signed char     __s8;
//#endif

typedef float          			FP32;                    				/*  单精度浮点数（32位长度）    */
typedef double         			FP64;


typedef unsigned    char   BOOL;
typedef unsigned    char   BOOLEAN;

typedef unsigned    char   BYTE;
typedef unsigned    char   UINT8;

typedef signed      char	INT8S;
typedef signed      short   INT16S;
typedef signed      short   INT16;

typedef unsigned    char    INT8U;
typedef unsigned    short   INT16U;
typedef unsigned    short   UINT16;

typedef unsigned    int     UINT;
typedef unsigned    int     INT32U;
typedef unsigned    int		UINT32;
typedef signed      int     INT;
typedef signed      int     INT32;
typedef signed      int     INT32S;

typedef unsigned    long    INT64U;
typedef unsigned    long    UINT64;
typedef signed      long    INT64S;

typedef unsigned int    DWORD;
typedef unsigned long   QWORD;

typedef char 			CHAR;
typedef unsigned short 	WORD;
typedef unsigned int 	DWORD;
typedef int 			INT;
typedef unsigned int 	UINT;
typedef long 			LONG;
typedef long long       LONGLONG;
typedef unsigned long 	ULONG;

#ifdef UNICODE
    typedef wchar_t 		WCHAR;
    typedef wchar_t 		TCHAR;

    #define _strlen         wcslen
    #define _strncpy        wcsncpy
    #define _strcat         wcscat
    #define _sprintf        swprintf
#else
    typedef char            WCHAR;
    typedef char            TCHAR;
    #define _strlen         strlen
    #define _strncpy        strncpy
    #define _strcat         strcat
    #define _sprintf        sprintf
    #define _sscanf         sscanf
#endif

typedef double          DOUBLE;
#define VOID 			void
typedef VOID			*PVOID;
typedef VOID          	*LPVOID;
typedef size_t 			SIZE_T;
typedef BOOL			*LPBOOL;
typedef BYTE            *LPBYTE;
typedef CHAR 			*LPSTR;
typedef const CHAR 	 	*LPCSTR;
typedef WCHAR 			*LPWSTR;
typedef const WCHAR 	*LPCWSTR;

typedef TCHAR           *LPTSTR;
typedef const TCHAR     *LPCTSTR;
typedef LPVOID			HANDLE;

typedef void *(*LPTHREAD_START_ROUTINE) (void *);  //线程执行函数

typedef HANDLE          *PHANDLE;
typedef HANDLE			HGLOBAL;
typedef LPVOID			HMODULE;


#ifdef OS_LINUX_X86_64
typedef signed int		*PINT_PTR;		// 32 位机器
typedef signed int		INT_PTR;		// 32 位机器
typedef unsigned int    UINT_PTR;		// 32 位机
typedef unsigned int    *PUINT_PTR;		// 32 位机器
typedef DWORD			DWORD_PTR;		// 32 位机器
typedef DWORD			*PDWORD_PTR;		// 32 位机器
typedef unsigned long	ULONG_PTR;		// 32 位机器
typedef unsigned long	*PULONG_PTR;		// 32 位机器
typedef signed long     LONG_PTR;		// 32 位机器
typedef signed long     *PLONG_PTR;		// 32 位机器
#else
typedef signed int		*PINT_PTR;		// 32 位机器
typedef signed int		INT_PTR;		// 32 位机器
typedef unsigned int    UINT_PTR;		// 32 位机
typedef unsigned int    *PUINT_PTR;		// 32 位机器
typedef DWORD			DWORD_PTR;		// 32 位机器
typedef DWORD			*PDWORD_PTR;		// 32 位机器
typedef unsigned long	ULONG_PTR;		// 32 位机器
typedef unsigned long	*PULONG_PTR;		// 32 位机器
typedef signed long     LONG_PTR;		// 32 位机器
typedef signed long     *PLONG_PTR;		// 32 位机器
#endif

#define err_t                   int

typedef DWORD           *PDWORD;
typedef unsigned long long 	ULONGLONG;
typedef HANDLE          HWND;
typedef CONST void		*LPCVOID;
typedef WORD 			FILEOP_FLAGS;
typedef unsigned char 	UCHAR;
typedef UCHAR 			*PUCHAR;
typedef CHAR 			*PCHAR;
typedef unsigned short 	USHORT;


#ifdef OS_LINUX_X86_64
typedef PLONG_PTR            WPARAM;
typedef PLONG_PTR            LPARAM;
typedef PLONG_PTR            LRESULT;
#else
typedef PLONG_PTR            WPARAM;
typedef PLONG_PTR            LPARAM;
typedef PLONG_PTR            LRESULT;
#endif

#define FO_MOVE 1
#define FO_COPY 2
#define FO_DELETE   3
#define FO_RENAME   4
#define FOF_MULTIDESTFILES  1
#define FOF_CONFIRMMOUSE    2
#define FOF_SILENT  4
#define FOF_RENAMEONCOLLISION   8
#define FOF_NOCONFIRMATION  16
#define FOF_WANTMAPPINGHANDLE   32
#define FOF_ALLOWUNDO   64
#define FOF_FILESONLY   128
#define FOF_SIMPLEPROGRESS  256
#define FOF_NOCONFIRMMKDIR  512
#define FOF_NOERRORUI       1024



/********************************************************************************************************/
/*	标识定义区																					        */
/********************************************************************************************************/
#ifndef LONG_STR_BUF_SIZE
#define LONG_STR_BUF_SIZE        4096
#endif

#ifndef MINI_STR_BUF_SIZE
#define MINI_STR_BUF_SIZE        128
#endif

#ifndef MIDDLE_STR_BUF_SIZE
#define MIDDLE_STR_BUF_SIZE      1024
#endif

#ifndef INVALID_HANDLE_VALUE
#define INVALID_HANDLE_VALUE        NULL
#endif

#ifndef nullptr
#define nullptr				NULL
#endif

#ifndef FALSE
#define FALSE 				0
#endif

#ifndef TRUE
#define TRUE  				1
#endif
#ifndef FALSE
#define FALSE 				0
#endif

#ifndef true
#define true  				1
#endif

#ifndef false
#define false  				0
#endif


#ifndef FAIL
#define FAIL				1
#endif

#ifndef SUCCESS
#define SUCCESS				0
#endif

#ifndef ERROR_SUCCESS
#define ERROR_SUCCESS       0
#endif

#ifndef IN
#define IN
#endif

#ifndef OUT
#define OUT
#endif

#ifndef _In_
#define _In_				IN
#endif

#ifndef _Out_
#define _Out_				OUT
#endif

#ifndef _Inout_
#define _Inout_
#endif

#ifndef _Out_opt_
#define _Out_opt_
#endif

#ifndef _In_opt_
#define _In_opt_
#endif

#ifndef APIENTRY
#define APIENTRY
#endif

#ifndef __stdcall
#define __stdcall
#endif

#ifndef __cdecl
#define __cdecl
#endif

#ifndef WINAPI
#define WINAPI
#endif


#ifndef MAX_PATH
#define MAX_PATH			255
#endif

/********************************************************************************************************/
/*	宏定义区																						    */
/********************************************************************************************************/

//#ifdef UNICODE
//#define _T(x)				L##x
//#define __T(x)              L##x
//#else
//#define _T(x)				x
//#define __T(x)				x
//#endif

#ifdef UNICODE
#define _T(x)  __T(x)
#define __T(x) L ## x
#else
#define _T(x)   x
#endif


#define _countof(x)			(sizeof(x) / sizeof(x[0]))

#ifndef __declspec
#define __declspec(x)
#endif

#ifndef _declspec
#define _declspec(x) __declspec(x)
#endif



// timeout_ms 参数, 永不超时
#define INFINITE 				0xFFFFFFFF
#define MIL                     1000000L
#define BIL                     1000000000L

// WaitForMultipleObjects WaitForSingleObject 返回值

#define WAIT_OBJECT_0			0
#define WAIT_TIMEOUT			2



/* Air interface protocol type id */
#ifndef __RFID_APL_ID_H__
#define __RFID_APL_ID_H__
enum rfid_APL_id {
	RFID_APL_UNKNOWN_ID=0, 
	RFID_APL_ISO15693_ID, 
	RFID_APL_ISO14443A_ID, 
	RFID_APL_ISO14443B_ID, 
	RFID_APL_EPCGEN2_ID,       //UHF
	RFID_APL_ISO18000P3M3, 
	RFID_APL_STISO14443B, 
	RFID_APL_SONYFELICA, 
	RFID_APL_NFCFORUMTYPE1, 
};
#endif

#ifndef RFID_UNKNOWN_PICC_ID
#define RFID_UNKNOWN_PICC_ID					0
#endif


/* ISO15693 tag type id */
#ifndef __RFID_ISO15693_PICC_ID__
#define __RFID_ISO15693_PICC_ID__
/* ISO15693 PICC id*/
enum 
{
   RFID_ISO15693_PICC_UNKNOWN=0, 
   RFID_ISO15693_PICC_ICODE_SLI_ID=1, 
   RFID_ISO15693_PICC_TI_HFI_PLUS_ID, 
   RFID_ISO15693_PICC_ST_SERIES_ID, 		    /* ST serial, ST can not identify tag type by UID */
   RFID_ISO15693_PICC_FUJ_MB89R118C_ID, 
   RFID_ISO15693_PICC_ST_M24LR64_ID, 
   RFID_ISO15693_PICC_ST_M24LR16E_ID, 	
   RFID_ISO15693_PICC_ICODE_SLIX_ID, 
   RFID_ISO15693_PICC_TIHFI_STANDARD_ID, 
   RFID_ISO15693_PICC_TIHFI_PRO_ID,             // password
   RFID_ISO15693_PICC_ICODE_SLIX2_ID, 
   RFID_ISO15693_PICC_CIT83128_ID, 				/* 北京华大*/
   RFID_ISO15693_PICC_ST25TV02K_ID, 
   RFID_ISO15693_PICC_ICODE_SLI_L_ID, 
   RFID_ISO15693_PICC_ICODE_SLIX_L_ID, 
   RFID_ISO15693_PICC_ICODE_SLI_S_ID, 
   RFID_ISO15693_PICC_ICODE_SLIX_S_ID, 
   RFID_ISO15693_PICC_EM4237SLIC_ID, 
   RFID_ISO15693_PICC_EM4237SLIX_ID, 
   RFID_ISO15693_PICC_RF430FR12XH_ID, 
   RFID_ISO15693_PICC_ST25DV04K_JF_ID, 
   RFID_ISO15693_PICC_ST_M24LRXX_ID, 
   RFID_ISO15693_PICC_TCSHF001_ID, 
   RFID_ISO15693_PICC_FM13HF_ID, 
   RFID_ISO15693_PICC_ST_M24LR04E_ID, 
   RFID_ISO15693_PICC_NBWX_TC603_ID, 
   
};
#endif


/* ISO14443A tag type id */
enum
{
	RFID_ISO14443A_PICC_NXP_ULTRALIGHT_ID=1,    // Ultralight
	RFID_ISO14443A_PICC_NXP_MIFARE_S50_ID, 
	RFID_ISO14443A_PICC_NXP_MIFARE_S70_ID, 
	RFID_ISO14443A_PICC_NXP_DESFIRE_EV1_ID, 
	RFID_ISO14443A_PICC_NTAG21x_ID, 
	RFID_ISO14443A_PICC_MIFARE_MINI_ID, 
	RFID_ISO14443A_PICC_MIFARE_PLUS, 
};

/* ST ISO14444B tag type id */
enum 
{
	RFID_STISO14443B_PICC_SRIX4K_ID=1, 
	RFID_STISO14443B_PICC_ST25TB512_AC_ID
};


/*
*	variable types
*/


#ifndef err_t
#define  err_t					signed int
#endif

#ifndef NO_ERR
#define NO_ERR                                  0
#endif

#ifndef mem_ptr_t
#define mem_ptr_t									HANDLE		
#endif

#define RFID_HANDLE_NULL							0
typedef void *                                      RFID_HANDLE;
#define RFID_READER_HANDLE							RFID_HANDLE
#define RFID_TAG_HANDLE								RFID_HANDLE
#define RFID_DN_HANDLE								RFID_HANDLE
#define MEM_PTR_T									RFID_HANDLE
#define RFID_NFC_HANDLE                             RFID_HANDLE
#define RFID_MODULE_HANDLE                          RFID_HANDLE
#define	WIN_MSG_t									UINT

// callback event type
enum
{
	RFIDLIB_EVNT_GETBUF_REPORT_FOUND=1, 
	RFIDLIB_EVNT_GETBUF_ERROR, 
	RFIDLIB_EVNT_GETBUF_EXIT, 
};


// Event method 
#define RFID_EVTMED_USE_MSG								1			// use sendmessage
#define RFID_EVTMED_USE_CB								2			// use call back function
#define RFID_EVTMED_USE_POSTMSG							3           // use postmessage
//typedef void (__stdcall *RFID_EVENT_CALLBACK)(WPARAM wparam, LPARAM lparam); 
//typedef void (__stdcall *RFID_EVENT_CALLBACK_NEW)(void *inParam, WPARAM wparam, LPARAM lparam);


typedef void(*RFID_EVENT_CALLBACK)(WPARAM wparam, LPARAM lparam);
typedef void(*RFID_EVENT_CALLBACK_NEW)(void *inParam, WPARAM wparam, LPARAM lparam);

//Inventory type 
#define AI_TYPE_NEW										1     // new antenna inventory  (reset RF power)
#define AI_TYPE_CONTINUE								2	  // continue antenna inventory;
#define AI_TYPE_NEW_WITH_NOINIT_BUFF					3

// Move position 
#define RFID_NO_SEEK				0					// No seeking 
#define RFID_SEEK_FIRST				1					// Seek first
#define RFID_SEEK_NEXT				2					// Seek next 
#define RFID_SEEK_LAST				3					// Seek last



/* 
* inventory stop trigger type
*/
enum
{
	INVEN_STOP_TRIGGER_TYPE_Tms,   
	INVEN_STOP_TRIGGER_TYPE_N_attempt, 
	INVEN_STOP_TRIGGER_TYPE_N_found, 
	INVEN_STOP_TRIGGER_TYPE_TIMEOUT, 
};


/*
usb enum information
*/
#define HID_ENUM_INF_TYPE_SERIALNUM			1
#define HID_ENUM_INF_TYPE_DRIVERPATH			2


/*
ip enum information
*/
#define IP_ENUM_INF_TYPE_IP				1
#define IP_ENUM_INF_TYPE_MAC				2
#define IP_ENUM_INF_TYPE_DESCRIPTION                    3
#define IP_ENUM_INF_TYPE_NAME                           4
#define IP_ENUM_INF_TYPE_TYPE				5


/*
* Output Name
*/
#define OUTPUT_NAME_BUZZER_INBOARD		"Buzzer"
#define OUTPUT_NAME_RELAY1				"Relay#1"







/*
* Open connection string 
*/
#define CONNSTR_NAME_RDTYPE				"RDType"
#define CONNSTR_NAME_COMMTYPE			"CommType"

/*
* communication interface type
*/
#define CONNSTR_NAME_COMMTYPE_COM		"COM"
#define CONNSTR_NAME_COMMTYPE_USB		"USB"
#define CONNSTR_NAME_COMMTYPE_NET		"NET"
#define CONNSTR_NAME_COMMTYPE_BLUETOOTH  "BLUETOOTH"

//USB Param
#define CONNSTR_NAME_HIDADDRMODE	    "AddrMode"
#define CONNSTR_NAME_HIDSERNUM		    "SerNum"


//COM Param
#define CONNSTR_NAME_COMNAME			"COMName"
#define CONNSTR_NAME_COMBARUD			"BaudRate"
#define CONNSTR_NAME_COMFRAME			"Frame"
#define CONNSTR_NAME_BUSADDR			"BusAddr"
//Netword
#define CONNSTR_NAME_REMOTEIP	"RemoteIP"
#define CONNSTR_NAME_REMOTEPORT	"RemotePort"
#define CONNSTR_NAME_LOCALIP	"LocalIP"

#define COMNSTR_BRODCAST        "BROADCAST"

//Bluetooth
#define CONNSTR_NAME_BLUETOOTH_SERNUM   "Addr"


#define CONNSTR_NAME_CHECK_ONLINE		"CheckOnline"


/*
* Get loaded reader driver option 
*/
#define LOADED_RDRDVR_OPT_CATALOG					"CATALOG"
#define LOADED_RDRDVR_OPT_NAME						"NAME"
#define LOADED_RDRDVR_OPT_ID						"ID"
#define LOADED_RDRDVR_OPT_COMMTYPESUPPORTED			"COMM_TYPE_SUPPORTED"

/*
* Reader driver type
*/
#define RDRDVR_TYPE_READER					"Reader" // general reader
#define RDRDVR_TYPE_MTGATE					"MTGate" // meeting gate
#define RDRDVR_TYPE_LSGATE					"LSGate" // Library secure gate


/* supported communication type */
enum
{
	COMMTYPE_COM_EN=0x01, 
	COMMTYPE_USB_EN=0x02, 
	COMMTYPE_NET_EN=0x04, 
	COMMTYPE_BLUETOOTH_EN=0x08, 
};


/*
* GPO Output Mode 
*/
enum
{
	OUTPUT_MODE_NOCHANGE, 
	OUTPUT_MODE_ON, 
	OUTPUT_MODE_OFF, 
	OUTPUT_MODE_FLASH, 
};


/*
*  ISO18000p3m3 
*/
// meta flags 
#define ISO18000p3m3_META_BIT_MASK_EPC						0x01
 
// begin round sel 
enum
{
	ISO18000p3m3_BEGIN_ROUND_SEL_ALL=0, 
	ISO18000p3m3_BEGIN_ROUND_SEL_DEASSERT_SL=0x02, 
	ISO18000p3m3_BEGIN_ROUND_SEL_ASSERT_SL=0x03, 
};
// session
enum
{
	ISO18000p3m3_S0=0x00, 
	ISO18000p3m3_S2=0x02, 
};

#define ISO18000p3m3_Dynamic_Q				0xFF



/*
* ISO18000-6C
*/

// session
enum
{
	ISO18000p6C_S0=0x00, 
	ISO18000p6C_S1=0x01, 
	ISO18000p6C_S2=0x02, 
	ISO18000p6C_S3=0x03, 
};
// inventory target
#define ISO18000p6C_TARGET_A			0x00
#define ISO18000p6C_TARGET_B			0x01


// inventory Sel type
#define ISO18000p6C_SEL_TYPE_ALL		0x00 
#define ISO18000p6C_SEL_TYPE_negate_SL	0x01
#define ISO18000p6C_SEL_TYPE_SL			0x02

//Q value
#define ISO18000p6C_Dynamic_Q			0xFF
/*
* meta data bit mask
*/
#define ISO18000p6C_META_BIT_MASK_EPC						0x01
#define ISO18000P6C_META_BIT_MASK_TIMESTAMP					0x02
#define ISO18000P6C_META_BIT_MASK_FREQUENCY					0x04
#define ISO18000p6C_META_BIT_MASK_RSSI						0x08
#define ISO18000P6C_META_BIT_MASK_READCOUNT					0x10 
#define ISO18000P6C_META_BIT_MASK_TAGDATA					0x20


// selection target
//b000: Inventoried (S0)
//b001: Inventoried (S1)
//b010: Inventoried (S2)
//b011: Inventoried (S3)
//b100: SL
//b101: RFU
//b110: RFU
//b111: RFU
#define ISO18000p6C_SELECT_TARGET_INV_S0			0x00
#define ISO18000p6C_SELECT_TARGET_INV_S1			0x01
#define ISO18000p6C_SELECT_TARGET_INV_S2			0x02
#define ISO18000p6C_SELECT_TARGET_INV_S3			0x03
#define ISO18000p6C_SELECT_TARGET_INV_SL			0x04

/* select action type
0x00: assert SL or inventoried → A deassert SL or inventoried → B
0x01: assert SL or inventoried → A do nothing
0x02: do nothing deassert SL or inventoried → B
0x03: negate SL or (A → B, B → A) do nothing
0x04: deassert SL or inventoried → B assert SL or inventoried → A
0x05: deassert SL or inventoried → B do nothing
0x06: do nothing assert SL or inventoried → A
0x07: do nothing negate SL or (A → B, B → A)
*/

// Memory bank type
#define ISO18000p6C_MEM_BANK_RFU					0x00
#define ISO18000p6C_MEM_BANK_EPC					0x01
#define ISO18000p6C_MEM_BANK_TID					0x02
#define ISO18000p6C_MEM_BANK_USER					0x03


#define PDA_UHF_RECORD_EPC_FLAG  (1)
#define PDA_UHF_RECORD_TID_FLAG  (1<<1)
#define PDA_UHF_RECORD_USER_FLAG  (1<<2)

#define PDA_HF_RECORD_UID_FLAG   (1)
#define PDA_HF_RECORD_BARCODE_FLAG (1<<1)


#define KEYWORD_TYPE_2K3DES					0x01
#define KEYWORD_TYPE_3K3DES					0x02
#define KEYWORD_TYPE_AES128					0x03


/* Connected tag information type */
#define CONNTAG_INF_TYPE_ISO14443P4_APPDATA                0x00 


/*
* reader buffer mode record data flag bits 
*/
#define BUFMODE_DFLAG_SN              0x01
#define BUFMODE_DFLAG_DB              0x02
#define BUFMODE_DFLAG_ANT             0x04
#define BUFMODE_DFLAG_INPUT           0x08

#endif
